<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Minikombajn Pomiarowy: Dokumentacja pliku /home/arek/Dokumenty/AVRprograms/MKP_3_7/clksys_driver.h</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Wygenerowano przez Doxygen 1.7.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Szukaj');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Minikombajn Pomiarowy&#160;<span id="projectnumber">1.0</span></div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Strona&#160;główna</span></a></li>
      <li class="current"><a href="files.html"><span>Pliki</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Szukaj" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>Lista&#160;plików</span></a></li>
      <li><a href="globals.html"><span>Globalne</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#define-members">Definicje</a> &#124;
<a href="#func-members">Funkcje</a>  </div>
  <div class="headertitle">
<h1>Dokumentacja pliku /home/arek/Dokumenty/AVRprograms/MKP_3_7/clksys_driver.h</h1>  </div>
</div>
<div class="contents">

<p>XMEGA Clock System driver header file.  
<a href="#_details">Więcej...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="avr__compiler_8h_source.html">avr_compiler.h</a>&quot;</code><br/>
</div>
<p><a href="clksys__driver_8h_source.html">Idź do kodu źródłowego tego pliku.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="define-members"></a>
Definicje</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="clksys__driver_8h.html#a0894c64562c3b1c309bab97a83382267">CLKSYS_Enable</a>(_oscSel)&#160;&#160;&#160;( OSC.CTRL |= (_oscSel) )</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This macro enables the selected oscillator.  <a href="#a0894c64562c3b1c309bab97a83382267"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="clksys__driver_8h.html#a2cd92dbb89e4051b9385a61273d19dc6">CLKSYS_IsReady</a>(_oscSel)&#160;&#160;&#160;( OSC.STATUS &amp; (_oscSel) )</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This macro check if selected oscillator is ready.  <a href="#a2cd92dbb89e4051b9385a61273d19dc6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="clksys__driver_8h.html#a2ace04e605910a306c6f65102e76c046">CLKSYS_RTC_ClockSource_Disable</a>()&#160;&#160;&#160;( CLK.RTCCTRL &amp;= ~CLK_RTCEN_bm )</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This macro disables routing of clock signals to the Real-Time Counter (RTC).  <a href="#a2ace04e605910a306c6f65102e76c046"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="clksys__driver_8h.html#ab06829d3775b72351cbb2cb65dbc4dc7">CLKSYS_AutoCalibration_Disable</a>(_clk)&#160;&#160;&#160;( (_clk).CTRL &amp;= ~DFLL_ENABLE_bm )</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This macro disables the automatic calibration of the selected internal oscillator.  <a href="#ab06829d3775b72351cbb2cb65dbc4dc7"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Funkcje</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="clksys__driver_8h.html#aad4e162434c2cc7e0087bbc0ddfe266c">CCPWrite</a> (volatile uint8_t *address, uint8_t value)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">CCP write helper function written in assembly.  <a href="#aad4e162434c2cc7e0087bbc0ddfe266c"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Opis szczegółowy</h2>
<div class="textblock"><p>XMEGA Clock System driver header file. </p>
<p>This file contains the function prototypes and enumerator definitions for various configuration parameters for the XMEGA Clock System driver.</p>
<p>The driver is not intended for size and/or speed critical code, since most functions are just a few lines of code, and the function call overhead would decrease code performance. The driver is intended for rapid prototyping and documentation purposes for getting started with the XMEGA Clock System.</p>
<p>For size and/or speed critical code, it is recommended to copy the function contents directly into your application instead of making a function call.</p>
<dl class="user"><dt><b>Application note:</b></dt><dd>AVR1003: Using the XMEGA Clock System</dd></dl>
<dl class="user"><dt><b>Documentation</b></dt><dd>For comprehensive code documentation, supported compilers, compiler settings and supported devices see readme.html</dd></dl>
<dl class="author"><dt><b>Autor:</b></dt><dd>Atmel Corporation: <a href="http://www.atmel.com">http://www.atmel.com</a> <br/>
 Support email: <a href="mailto:avr@atmel.com">avr@atmel.com</a></dd></dl>
<dl class="rcs"><dt><b>Revision:</b></dt><dd>1665 </dd></dl>
<dl class="rcs"><dt><b>Date:</b></dt><dd>2008-06-05 09:21:50 +0200 (to, 05 jun 2008) </dd></dl>
<p><br/>
</p>
<p>Copyright (c) 2008, Atmel Corporation All rights reserved.</p>
<p>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:</p>
<p>1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.</p>
<p>2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.</p>
<p>3. The name of ATMEL may not be used to endorse or promote products derived from this software without specific prior written permission.</p>
<p>THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </p>
</div><hr/><h2>Dokumentacja definicji</h2>
<a class="anchor" id="ab06829d3775b72351cbb2cb65dbc4dc7"></a><!-- doxytag: member="clksys_driver.h::CLKSYS_AutoCalibration_Disable" ref="ab06829d3775b72351cbb2cb65dbc4dc7" args="(_clk)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CLKSYS_AutoCalibration_Disable</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">_clk</td><td>)</td>
          <td>&#160;&#160;&#160;( (_clk).CTRL &amp;= ~DFLL_ENABLE_bm )</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This macro disables the automatic calibration of the selected internal oscillator. </p>
<dl><dt><b>Parametry:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">_clk</td><td>Clock source calibration to disable, either DFLLRC2M or DFLLRC32M. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a0894c64562c3b1c309bab97a83382267"></a><!-- doxytag: member="clksys_driver.h::CLKSYS_Enable" ref="a0894c64562c3b1c309bab97a83382267" args="(_oscSel)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CLKSYS_Enable</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">_oscSel</td><td>)</td>
          <td>&#160;&#160;&#160;( OSC.CTRL |= (_oscSel) )</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This macro enables the selected oscillator. </p>
<dl class="note"><dt><b>Nota:</b></dt><dd>Note that the oscillator cannot be used as a main system clock source without being enabled and stable first. Check the ready flag before using the clock. The function <a class="el" href="clksys__driver_8h.html#a2cd92dbb89e4051b9385a61273d19dc6" title="This macro check if selected oscillator is ready.">CLKSYS_IsReady( _oscSel )</a> can be used to check this.</dd></dl>
<dl><dt><b>Parametry:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">_oscSel</td><td>Bitmask of selected clock. Can be one of the following OSC_RC2MEN_bm, OSC_RC32MEN_bm, OSC_RC32KEN_bm, OSC_XOSCEN_bm, OSC_PLLEN_bm. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a2cd92dbb89e4051b9385a61273d19dc6"></a><!-- doxytag: member="clksys_driver.h::CLKSYS_IsReady" ref="a2cd92dbb89e4051b9385a61273d19dc6" args="(_oscSel)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CLKSYS_IsReady</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">_oscSel</td><td>)</td>
          <td>&#160;&#160;&#160;( OSC.STATUS &amp; (_oscSel) )</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This macro check if selected oscillator is ready. </p>
<p>This macro will return non-zero if is is running, regardless if it is used as a main clock source or not.</p>
<dl><dt><b>Parametry:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">_oscSel</td><td>Bitmask of selected clock. Can be one of the following OSC_RC2MEN_bm, OSC_RC32MEN_bm, OSC_RC32KEN_bm, OSC_XOSCEN_bm, OSC_PLLEN_bm.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Zwraca:</b></dt><dd>Non-zero if oscillator is ready and running. </dd></dl>

</div>
</div>
<a class="anchor" id="a2ace04e605910a306c6f65102e76c046"></a><!-- doxytag: member="clksys_driver.h::CLKSYS_RTC_ClockSource_Disable" ref="a2ace04e605910a306c6f65102e76c046" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CLKSYS_RTC_ClockSource_Disable</td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td>&#160;&#160;&#160;( CLK.RTCCTRL &amp;= ~CLK_RTCEN_bm )</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This macro disables routing of clock signals to the Real-Time Counter (RTC). </p>
<p>Disabling the RTC saves power if the RTC is not in use. </p>

</div>
</div>
<hr/><h2>Dokumentacja funkcji</h2>
<a class="anchor" id="aad4e162434c2cc7e0087bbc0ddfe266c"></a><!-- doxytag: member="clksys_driver.h::CCPWrite" ref="aad4e162434c2cc7e0087bbc0ddfe266c" args="(volatile uint8_t *address, uint8_t value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CCPWrite </td>
          <td>(</td>
          <td class="paramtype">volatile uint8_t *&#160;</td>
          <td class="paramname"><em>address</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>CCP write helper function written in assembly. </p>
<p>This function is written in assembly because of the timecritial operation of writing to the registers.</p>
<dl><dt><b>Parametry:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">address</td><td>A pointer to the address to write to. </td></tr>
    <tr><td class="paramname">value</td><td>The value to put in to the register. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Pliki</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Funkcje</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Zmienne</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Definicje</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address class="footer"><small>Wygenerowano Fri Dec 30 2011 17:28:02 dla Minikombajn Pomiarowy programem&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
</body>
</html>
